<template>
	<view class="container">
		<!-- <headerTop title="质保单"></headerTop> -->
		<u--image :src="urlSrc" @click="$showImgprview(urlSrc)" width="100%" :showLoading="true"></u--image>
		<!-- <image :src="urlSrc" @click="$showImgprview(urlSrc)"></image> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchForm:{
					user_code:''
				},
				urlSrc:''
			}
		},
		onLoad({user_code}) {
			this.searchForm.user_code = user_code
			this.$initConfig().then(_=>{
				this.getInfo()
			})
		},
		methods: {
			getInfo(){
				let _this = this
				uni.showLoading({
					title:'请稍后',
					mask:true
				})
				_this.$http('order/getOrderByUserCode',{
					..._this.searchForm
				}).then(res=>{
					if(res.code){
						uni.hideLoading()
						_this.urlSrc = _this.httpbaseUrl + res.data.url
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 100%;
		height: 100vh;
		image {
			width: 100%;
			max-height: 100%;
		}
	}
</style>
